<?
if($cBanco->conectar()){
?>
<p>
  Selecione as tabelas para gerar as classes:
</p>
<form action="?conteudo=passo4" method="POST">
	<table border="0" cellpadding="0" cellspacing="3" width="100%">
		<tr>
			<td width="150">Host:</td>
			<td><? echo $_SESSION['host'];?></td>
		</tr>
		<tr>
			<td>
        Usu&aacute;rio:
      </td>
			<td><? echo $_SESSION['usuario'];?></td>
		</tr>
		<tr>
			<td>Senha:</td>
			<td>******</td>
		</tr>
		<tr>
			<td>Banco de dados:</td>
			<td><? echo $_SESSION['banco'];?></td>
		</tr>
		<tr>
			<td valign="top">Tabelas:</td>
			<td valign="top">
            	<table border="0" cellpadding="0" cellspacing="3" width="100%">
                <?
					$tabelas = $cBanco->listarTabelas();
					for($i = 0; $i < count($tabelas); $i++){
				?>
				<tr>
					<td width="30"><input type="checkbox" name="tabelas[]" value="<? echo $tabelas[$i]->getTitulo()?>"></td>
					<td><A HREF="showFields.php?tableName=<? echo $tabelas[$i]->getTitulo()?>"><? echo $tabelas[$i]->getTitulo()?></A></td>
										
				</tr>
				<?
                	}
				?>
				</table>
			</tr>
		</tr>
		<tr>
			<td>Vers&atilde;o:</td>
			<td><input type="radio" checked name="versao" value="5">5 &nbsp;&nbsp;<input type="radio" name="versao" value="4">4 </td>
	</tr>
		<tr>
			<td></td>
			<td><input type="submit" value="Avan&ccedil;ar"></td>
		</tr>
	</table>
</form>
<?
}else{
?>
<p>Erro ao tentar exibir tabelas do banco: <? echo $_SESSION['banco']?></p>
<p><a href="javascript:history.back();">Voltar</a></p>
<?
}
?>
